<!DOCTYPE html>
<html>
<head>
	<title><?=$title?></title>
	<link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" type="text/css" href="/css/main.css" />
	<link rel="stylesheet" type="text/css" href="/css/all.css" />
	<link rel="icon" href="/favicon.ico" type="image/x-icon">
	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
	
	<script type="text/javascript" src="/link/js_vars"></script>
	<script type="text/javascript" src="/js/jquery.js"></script>
	<script type="text/javascript" src="/js/lightbox/js/lightbox.js"></script>
	<link href="/js/lightbox/css/lightbox.css" rel="stylesheet" />
	<script type="text/javascript" src="/js/md5.js"></script>
	<script type="text/javascript" src="/js/main.js"></script>
	<script type="text/javascript" src="/js/statistics.js"></script>
	<? if (!empty($addJS) && is_array($addJS)) { foreach ($addJS as $JS): ?>
	<script type="text/javascript" src="<?=$JS?>"></script>
	<? endforeach; } ?>
	<? if (!empty($addCSS) && is_array($addCSS)) { foreach ($addCSS as $CSS): ?>
	<link rel="stylesheet" type="text/css" href="<?=$CSS?>" />
	<? endforeach; } ?>
</head>
<body>
<center>
	<div id="mainDiv">
		<div id="topDiv">
			<div id="headDiv">
				<a style="display: table; text-decoration: none;" href="/">
					<img height="70" width="62" src="/img/buddhist_70x.png" style="margin-right: 10px;">
					<span style="font-size: 36px;">CODDISM</span>
				</a>
				<div id="searchDiv">
					<input type="text" value="<?=isset($searchText)?$searchText:''?>" id="searchInput"/>
					<span id="searchSubmit"></span>
					<br>
					<span>Например, <a href="/search/firefox">Firefox</a></span>
				</div>
			</div>
			<div id="menuDiv">
				<div id="menuDivTopLine"></div>
				<? if (isset($mainMenu) && is_array($mainMenu)):
					foreach ($mainMenu as $menu):
				?> <a href="/<?=$menu->pUrl?>" class="menuLink<?=($menu->pUrl == $activePage)?' activeMenuLink':''?>"><?=$menu->pName?></a> <?
					endforeach;
					endif;
				?>
			</div>
			<?=$this->load->view('login_block', null, true)?>
		</div>
		<div id="middleDiv">
			<div id="middleLeftBGDiv">
			</div>
			<center id="bottomSubCenter">
				<div id="middleSubDiv">
					<div class="rowDiv">
						<div id="contentDiv">
							<div id="contentSubHeightDiv">
								<?=(isset($content))?$content:" ";?>
								<div id="corner_1"><div id="corner_sub_1"></div></div>
								<div id="corner_2"><div id="corner_sub_2"></div></div>
							</div>
						</div>
						<div id="rightDiv">
							<?=(isset($rightContent))?$rightContent:" ";?>
						</div>
					</div>
				</div>
			</center>
		</div>
		<div id="bottomDiv">
			<center>
				<div id="bottomSubDiv">
					<div id="corner_3"><div id="corner_sub_3"></div></div>
					<div style="display:table; width:100%;">
						<div style="float:left">
							<span style="font-size:11pt">Наш хостинг</span><br>
							<a target="_blank" href="http://www.hostland.ru?r=c7fa2de4"><img src="/img/hostland.png" width="200"></a>
						</div>
						<div class="bottomLinksListDiv">
							<h4>Ссылколист</h4>
							<a href="http://md5.coddism.com/">MD5 generator</a>
							<a href="http://source.virtser.net/">Source Code Highlighter</a>
						</div>
						<div style="float:right">
							<div>2012-2013 © <a href="/">coddism.com</a></div>
						</div>
					</div>
				</div>
			</center>
		</div>
	</div>
</center>
</body>
</html>